﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SewerAPI.Core;
using System.Globalization;
using SewerAPI.Security;

namespace SewerAPI
{
    public static class Configuration
    {
        #region Private Settings

        private static string alias = string.Empty;
        private static int port = Constants.DEFAULTPORT;
        private static CultureInfo currentculture = CultureInfo.CurrentCulture;
        private static IEncryptionEngine encryptionengine;

        #endregion

        #region Public Settings

        /// <summary>
        /// Alias name of the current session.
        /// </summary>
        public static string Alias
        {
            get { return alias; }
            set { alias = value; }
        }
        
        public static int Port
        {
            get { return port; }
            set { port = value; }
        }

        /// <summary>
        /// The current culture
        /// </summary>
        public static CultureInfo CurrentCulture
        {
            get { return currentculture; }
            set { currentculture = value; }
        }

        /// <summary>
        /// Get the encryption engine
        /// </summary>
        internal static IEncryptionEngine EncryptionEngine
        {
            get {
                if (encryptionengine == null)
                {
                    encryptionengine = new StandardEncryptionEngine();
                }
                return encryptionengine;
            }
            set
            {
                encryptionengine = value;
            }
        }

        #endregion
    }
}
